@charset "utf-8";
/**
* sherlock221b
* 常用功能函数
*/


//2x进行缩放
@function rem($px){
  @return  $px / 2px * 1px ;
}

//hack ie9
@mixin ie9($value){
  opacity : $value+ "\9\0";
}


//transform 全适配
@mixin px-transform($value) {
  -webkit-transform: $value;
  transform: $value;
  -moz-transform: $value;
  -ms-transform: $value;
}

//transition 全适配
@mixin px-transition($value) {
  -webkit-transition: $value;
  transition: $value;
  -moz-transition: $value;
  -ms-transition: $value;
}

//css3 水平垂直居中
@mixin transCenter() {
  position: absolute;
  left: 50%;
  top: 50%;
  -webkit-transform: translate(-50%, -50%);
  transform: translate(-50%, -50%);
  -moz-transform: translate(-50%, -50%);
  -ms-transform: translate(-50%, -50%);
}
//animation
@mixin animation($animationName) {
  -webkit-animation: $animationName;
  -ms-animation: $animationName;
  -moz-animation: $animationName;
  -o-animation: $animationName;
  animation: $animationName;
}


//key frames适配
@mixin keyframes($animationName) {
  @-webkit-keyframes #{$animationName} {
    @content;
  }
  @-moz-keyframes #{$animationName} {
    @content;
  }
  @-o-keyframes #{$animationName} {
    @content;
  }

  @-ms-keyframes #{$animationName} {
    @content;
  }

  @keyframes #{$animationName} {
    @content;
  }
}

//高清屏幕
@mixin  animation-mode($mode){
  -webkit-animation-fill-mode: $mode !important;
  -moz-animation-fill-mode: $mode !important;
  -ms-animation-fill-mode: $mode !important;
  animation-fill-mode: $mode !important;
}





